package org.lboot.flow.module.define;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.jpa.repository.support.JpaRepositoryImplementation;

import java.util.List;

public interface FlowDefineDAO extends JpaRepositoryImplementation<FlowDefine,String> {
    /**
     * 根据流程定义编码获取
     * @param code
     * @return
     */
    List<FlowDefine> findByFlowCode(String code);

    @Query("SELECT DISTINCT u.flowGroup FROM FlowDefine u")
    List<String> findDistinctGroup();
}
